package com.cci.kangdao.dao;

import com.cci.kangdao.dao.model.WorkOrderSynchroT;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkOrderSynchroTMapper {

    int insert(WorkOrderSynchroT record);

    int updateById(WorkOrderSynchroT record);

    WorkOrderSynchroT selectById(@Param("id") Long id);

    WorkOrderSynchroT selectByStatusAndOrderNo(@Param("orderNo") String orderNo,@Param("processStatus") Integer processStatus);
    /**
     *  同步状态失败的记录
     * @return
     */
    List<WorkOrderSynchroT> selectByStatus(@Param("channelName") String channelName);
    /**
     *  同步状态失败的分组记录
     * @return
     */
    List<String> selectGroupOrderNoByStatus(@Param("channelName") String channelName);
    /**
     *  同步工单信息失败的记录
     * @return
     */
    List<WorkOrderSynchroT> selectByInfo(@Param("channelName") String channelName);
    /**
     *  根据工单id查询同步工单状态失败的记录
     * @return
     */
    List<WorkOrderSynchroT> selectByOrderNo(@Param("orderNo") String orderNo);

}
